<template>
  <header class="home-header">
    <div class="container">
      <h1 class="logo">
        <router-link to="/">小兔仙</router-link>
      </h1>
      <header-nav></header-nav>
      <div class="search">
        <i class="iconfont icon-search"></i>
        <input type="text" placeholder="搜一搜" />
      </div>
      <app-header-cart></app-header-cart>
    </div>
  </header>
</template>
<script>
import { defineComponent } from 'vue'
import HeaderNav from './nav.vue'
import AppHeaderCart from '../app-header-cart.vue'
export default defineComponent({
  name: 'home-header',
  components: {
    HeaderNav,
    AppHeaderCart
  },
  setup() { }
})
</script>
<style lang="less" scoped>
.home-header {
  background: #fff;
  .container {
    display: flex;
    align-items: center;
    .logo {
      width: 200px;
      a {
        display: block;
        height: 132px;
        width: 100%;
        text-indent: -9999px;
        background: url(../../assets/images/logo.png) no-repeat center 18px /
          contain;
      }
    }

    .search {
      width: 170px;
      height: 32px;
      position: relative;
      border-bottom: 1px solid #e7e7e7;
      line-height: 32px;
      .icon-search {
        font-size: 18px;
        margin-left: 5px;
      }

      input {
        width: 140px;
        padding-left: 5px;
        color: #666;
      }
    }
  }
}
</style>